refactor: use SpliceState enum instead of bool in splice functions#12365
Open
xtqqczze wants to merge 1 commit into
Open
refactor: use SpliceState enum instead of bool in splice functions#12365xtqqczze wants to merge 1 commit into
xtqqczze wants to merge 1 commit into
Conversation
Contributor
|
I don' t think this is readable. Please don't introduce unnecessary confliction. |
oech3
reviewed
May 18, 2026
|
GNU testsuite comparison: |
xtqqczze
commented
May 18, 2026
Contributor
|
cc: reviewers |
364700e to
d2bffd9
Compare
Improve code clarity by using explicit enum values instead of boolean semantics
Contributor
|
If you don't like bool and flush, I just embed the required fallback to a unified function and make others private. cc reviewers PLEASE DON'T MERGE THIS. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Contributor
|
I marked this as closed by my PR since the approach embedding the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the ambiguous
io::Result<bool>return type inpipe::splice_unboundedandpipe::splice_unbounded_brokerwithio::Result<SpliceState>.This makes splice outcomes self-describing instead of relying on inverted boolean semantics (true meaning fallback required).
@oech3 sorry for the conflicts with #12359 and #12364, but I think this will make these PRs easier to review.